LHA Tarawa wrote:I'll try to answer because I made a post about skill training time, and was given a pretty good response by CCP.
In the server farm, there is one server that just maintains everyone's character data.
In the database there is a table indexed on time.
You press submit on the training queue, and your client tells that one server that maintains all the character info what skills you want to train. That server calculates all the completion times on all the skills and puts them in that database table with the completion time.
On that server that maintains all character data, there is a training queue monitoring process. It compares current time to the records in the database queue, and if any are due to complete, it processes them and updates your character info. IF NO records in that table are ready to process, then that queue manager goes to sleep for a few seconds to let the other processes on that server have some CPU time.
When the sleep time is over, it wakes up, completes any skills that should have completed while it was asleep, then... yes, goes to sleep again.
SO, If I hit submit, and one skill should complete at 12:01:01 and the next should complete at 12:21:01. As 12:01:00, the queue manager goes to sleep for 10 seconds. When it wakes up at 12:01:10, it sees my first skill's complete time is past, so updates my character with that skill. The fact that skill completed 9 seconds late in no way effects the fact that the queue says my second skill is scheduled to finish at 12:21:01.
That process that calculates the completion time, and puts them in the DB? Well, if it sees that you had a skill in the database table that you no longer have there, then it calculates the time from now until its scheduled completion, calculates a % complete, and throws it into another table of your partially trained. When you put that skill back into queue, it pulls it out of partially trained and uses that info to compute the correct complete time.
Finally, this "completion time" is based on your current attributes. SO, before you can change attributes, you have to pause queue, pulling everything out of the queue database table into partially trained. Then you adjust your attribs (remap or implants) and submit your queue again. Now the new attribs are used to calculate the completion times.
SO, even if you skill is scheduled to complete during down time, the next skill in the queue will complete on time.
On those upgrade days, players tend to pull all the small skills out of the queue, and just have one really long skil in there, in fear that if the system is still down when those small skills finish, the longer one at the end of the queue won't start training until the server is back up. This is incorrect. The completion time of the furthest our skill in the queue is unaffected by server downtime because that completion time in the database table is safely stored to hard disk and does not change when the server comes back up.